import Vue from "vue";
import VueRouter from "vue-router";

// 引入页面路由
const Echarts = () => import("views/Echarts.vue");
const RiskEcharts = () => import("views/risk/RiskEcharts.vue");
const riskEvent = () => import("views/risk/riskEvent.vue");
const riskIncome = () => import("views/risk/riskIncome.vue");
const worldMap = () => import("views/world/worldMap.vue");
const drag = () => import("views/world/drag.vue");
const Tiptap = () => import("views/world/Tiptap.vue");

Vue.use(VueRouter);

const routes = [
  {
    path: "",
    redirect: "/tiptap",
  },
  {
    path: "/echart",
    component: Echarts,
  },
  {
    path: "/tiptap",
    component: Tiptap,
  },
  {
    path: "/drag",
    component: drag,
  },
  {
    path: "/worldMap",
    component: worldMap,
  },
  {
    path: "/RiskEcharts",
    component: RiskEcharts,
  },
  {
    path: "/riskEvent",
    component: riskEvent,
  },
  {
    path: "/riskIncome",
    component: riskIncome,
  },
];

const router = new VueRouter({
  mode: "hash",
  routes,
});

export default router;
